package cn.qu.v1.platform.aop;

import cn.qu.v1.platform.inject.ProxyBeanDef;

import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
import java.util.List;

/**
 * Created by zh on 17/1/17.
 */
public class ProxyMethod {

    private Method sourceMethod;
    private List<ProxyBeanDef> proxyBeanDefList;

    private Method proxyMethod;
    private Class<? extends Annotation> annotationClass;

    public ProxyMethod(Method sourceMethod, List<ProxyBeanDef> proxyBeanDefList, Method proxyMethod) {
        this.sourceMethod = sourceMethod;
        this.proxyBeanDefList = proxyBeanDefList;
        this.proxyMethod = proxyMethod;
    }

    public ProxyMethod(Method sourceMethod, List<ProxyBeanDef> proxyBeanDefList, Method proxyMethod, Class<? extends Annotation> annotationClass) {
        this(sourceMethod, proxyBeanDefList, proxyMethod);
        this.annotationClass = annotationClass;
    }

    public List<ProxyBeanDef> getAopProxy() {
        return proxyBeanDefList;
    }

    public Method getProxyMethod() {
        return proxyMethod;
    }

    public Method getSourceMethod() {
        return sourceMethod;
    }

    public Class<? extends Annotation> getAnnotationClass() {
        return annotationClass;
    }
}
